-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: minor fix in identifying user #302
chore: minor fix in identifying user #302
Conversation
} | ||
CustomerIO.shared.identify(userId: userId, traits: traits) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this fail if traits
are being attached to anonymous profile? Or do you plan to expose separate method for anonymous case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean if traits is nil
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I mean, when profile is anonymous i.e. userId
is nil
. But customer wants to attach traits
to anonymous profile. Similar to this method in iOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you’re right. This doesn’t meet the anonymous profile criteria. Iwilll go ahead and update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rehan, I just realized that user identification is covered under a separate ticket, which will also address anonymous profiles.
I think it’s best to leave this change for that ticket to avoid scope creep. I understand that this condition doesn’t resolve the anonymous criteria, but I suggest handling it in the upcoming ticket.
Though this current change is also a scope creep but I wanted to do it to help testing the package better and as quick as we can.
I am dropping a note in the ticket so that this fix is not overlooked. Does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, since the ticket will make any necessary changes required to handle the case for anonymous profile, I'm good with it 👍🏻
Regarding the conversation on the other PR: I updated the code but forgot to push it to the same PR.